package com.supermarket.business.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.supermarket.common.annotation.Excel;
import com.supermarket.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品对象 sys_product
 * 
 * @author ruoyi
 * @date 2025-07-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("sys_product")
public class SupermarketProduct implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String specification;

    /** 销售价格 */
    @Excel(name = "销售价格")
    private BigDecimal price;

    /** 当前库存 */
    @Excel(name = "当前库存")
    private Long stock;

    /** 保质期(天) */
    @Excel(name = "保质期(天)")
    private Long shelfLife;

    /** 产地 */
    @Excel(name = "产地")
    private String origin;

    /** 供应商ID */
    @Excel(name = "供应商ID")
    private Long supplierId;

    /** 状态(0正常 1下架) */
    private String status;

    /** 创建者 */
    private String createBy;

    /** 创建人id */
    private Long createId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新者 */
    private String updateBy;

    /** 更新人id */
    private Long updateId;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 备注 */
    private String remark;

    /** 图片地址 */
    @Excel(name = "图片地址")
    private String imageUrl;

    /**
     * 文件上传
     */
    private MultipartFile file;
}
